package BasicClass;

import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

public class Bill {
    private SimpleIntegerProperty Id;
    private SimpleStringProperty BookName;
    private SimpleStringProperty Author;
    private SimpleStringProperty Account;
    private SimpleStringProperty AccountName;
    private SimpleIntegerProperty Number;
    private SimpleDoubleProperty Price;
    private SimpleStringProperty Date;
    private String ISBN;

    public Bill(int id, String bookName, String author,
                String account, String accountName, int number,
                Double price, String date) {
        this.Id = new SimpleIntegerProperty(id);
        this.BookName = new SimpleStringProperty(bookName);
        this.Author = new SimpleStringProperty(author);
        this.Account = new SimpleStringProperty(account);
        this.AccountName = new SimpleStringProperty(accountName);
        this.Number = new SimpleIntegerProperty(number);
        this.Price = new SimpleDoubleProperty(price);
        this.Date = new SimpleStringProperty(date);
    }

    public String getDate() {return Date.get();}
    public void setDate(String date) {this.Date.set(date);}
    public double getPrice() {return Price.get();}
    public void setPrice(double price) {this.Price.set(price);}
    public int getNumber() {return this.Number.get();}
    public void setNumber(int number) {this.Number.set(number);}
    public String getAccount() {return Account.get();}
    public void setAccount(String account) {this.Account.set(account);}
    public String getBookName() {return BookName.get();}
    public void setBookName(String bookName) {this.BookName.set(bookName);}
    public String getAuthor() {return Author.get();}
    public void setAuthor(String author) {this.Author.set(author);}
    public String getAccountName() {return AccountName.get();}
    public void setAccountName(String accountName) {this.AccountName.set(accountName);}

    public int getId() {return Id.get();}
    public void setId(int id) {this.Id.set(id);}
    public String getISBN() {
        return ISBN;
    }

    public void setISBN(String ISBN) {
        this.ISBN = ISBN;
    }

    @Override
    public String toString(){
        return getId() +","+getBookName()+","+getAuthor()+","+getAccount()+","
                +getAccountName()+","+getNumber()+","+getPrice()+","+getDate();
    }
}
